<?php
  require_once('db_connection.php');
  $query = "SELECT * FROM `users`";
  $result  = mysql_query($query) or die(mysql_error());

  $selected_records = mysql_num_rows($result);
  echo "<h4>TOTAL : $selected_records </h4>";

?>
<link href="../html/css/site.css" rel="stylesheet" type="text/css" />

<table width="80%" cellspacing="0" cellpadding="0">
  <thead>
    <tr>
      <th>ID</th>
      <th>NAME</th>
      <th>EMAIL</th>
      <th>ADDED DATE</th>
      <th>STATUS</th>
    </tr>
  </thead>
  <tbody>
<?php
  while($ans = mysql_fetch_assoc($result)){
?>
    <tr>
      <td><?=$ans['id']?></td>
      <td><?=$ans['name']?></td>
      <td><a href="mailto:<?=$ans['email']?>"><?=$ans['email']?></a></td>
      <td><?=date('d-M-Y h:i:s a',strtotime($ans['added_date']))?></td>
      <td><?=getStatus($ans['status'])?></td>
    </tr>
<?php
    //print_r($ans);
  }
?>


  </tbody>
</table>

